<?php if(!defined('BASEPATH')) exit('Direct Script Access Not Allowed');

class Page extends CI_Controller {
	
	public function view($page = 'home' ){
	
	if(!file_exists('application/views/pages/'.$page.'.php')){
		show_404();
	}
	
	$data['title'] = ucwords($page);
	
	$this->load->view('templates/header',$data);
	$this->load->view('pages/'.$page,$data);
	$this->load->view('templates/footer',$data);
		
	}
}

/* end of file page.php */
/* Location appclication/controller/page.php */